﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Lapv.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Lapv.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="server">
    <div class="action">
        <ul>
            <li>
                <label>
                    Chọn user:</label>
                <asp:DropDownList ID="ddlUser" runat="server" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlUser_SelectedIndexChanged"
                    AutoPostBack="true">
                    <asp:ListItem Text="Chọn user" Value="-1"></asp:ListItem>
                </asp:DropDownList>
            </li>
            <li>
                <label>
                    Tổng số bản ghi:</label>
                <asp:Label ID="totalcount" runat="server"></asp:Label>
            </li>
        </ul>
        <div class="clr">
        </div>
    </div>
    <div class="form form2">
        <asp:DataGrid CssClass="table1" runat="server" ID="dtgrid" AutoGenerateColumns="false" >
            <Columns>
                <asp:TemplateColumn HeaderText="ID" ItemStyle-Width="2%">
                    <ItemTemplate>
                        <%# Eval("id")%>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Thời gian" ItemStyle-Width="7%">
                    <ItemTemplate>
                        <%# ((DateTime)DataBinder.Eval(Container.DataItem, "date")).ToString("dd/MM/yyyy hh:mm:ss tt")%>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Tên đăng nhập" ItemStyle-Width="5%">
                    <ItemTemplate>
                        <a href="<%=domain %>Default.aspx?userid=<%# Eval("gmId")%>&tid=<%= type %>" style="font-weight: bold;">
                            <%# Eval("username")%>
                        </a>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Hành động" ItemStyle-Width="7%">
                    <ItemTemplate>
                        <a href="<%= domain %>Default.aspx?userid=<%= userid%>&tid=<%# Eval("type")%>" style="font-weight: bold;">
                            <%# GetType((string)Eval("type"))%>
                        </a>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Nội dung" ItemStyle-Width="25%" >
                    <ItemTemplate>
                        <%# Eval("logcontent")%>
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
        <br />
        <div style="overflow: hidden;">
            <asp:Button ID="btnTop100" runat="server" Text="Top 100" OnClick="btnTop100_Click" />
            <asp:Button ID="btnTop1000" runat="server" Text="Top 1000" OnClick="btnTop1000_Click" />
            <asp:Button ID="btnDelete" Text="view all" runat="server" OnClientClick="return confirm('Hiển thị tất cả ?')"
                OnClick="btnDelete_Click" />
        </div>
    </div>
</asp:Content>
